package kr.hkit.PowerJava.chapter14;

import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.HeadlessException;

import javax.swing.JFrame;

class MyFrame extends JFrame{

	public MyFrame(String title) throws HeadlessException {
		super(title);
		init();
	}

	private void init() {
		setSize(450,300);
		setLayout(new BorderLayout(30,30));
		
		add(new Button("Center"), BorderLayout.CENTER);
		add(new Button("Page Start"), BorderLayout.NORTH);
		add(new Button("Page End"), BorderLayout.PAGE_END);
		add(new Button("Line Start"), BorderLayout.LINE_START);
		add(new Button("Line End"), BorderLayout.LINE_END);
		
		
		setVisible(true);
	}
	
}
public class BorderLayoutEx {
  public static void main(String[] args) {
	new MyFrame("BorderLayout 예제");
}
}
